home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / MONITOR / TOPOGRAF.ARJ / TOPOGRAF.DOC < prev    next >
Text File  |  1992-03-21  |  4KB  |  63 lines

  1. Instructions and Background:
  2. -----------------------------
  3.  
  4. Recently, a set of files called "TOPOx.ZIP" were uploaded to EXEC-PC.
  5. These files contain topographic information about the United States.
  6. This means that they contain feet-above-sea-level altitudes for
  7. thousands of points across the U.S.  Although the uploader promised to
  8. upload the entire U.S., only the eastern half of the country was
  9. uploaded and no description or explanation of the file contents ever
  10. appeared.  I figured out what the contents of the files represented and
  11. wrote a couple of programs to display those contents graphically in both
  12. VGA (320 pixels by 200 pixels in 256 colors) and an oddball SuperVGA mode
  13. (360 pixels by 480 pixels in 256 colors).  Here are those programs,
  14. along with a sample of the topographic data contained in the
  15. "TOPOx.ZIP" files.  If nothing else, they make pretty screen displays.
  16. To run them, unZIP "TOPOGRAF.ZIP" into a sub-directory, then type
  17. "TOPOGRAF" for VGA, or "TOPOSVGA" for the higher resolution.  The area
  18. displayed will be a section of the southern coast of the U.S., and a
  19. little bit of the Gulf of Mexico.  The colors don't really have any
  20. meaning, except that sea-level will be black, and all points with the
  21. same altitude will be the same color.  Be prepared: there are thousands
  22. of pieces of data being processed to produce this display.  If possible,
  23. use a RAM disk or disk-cache to contain the data-files, since this is
  24. about the only way to speed the process up.  Note that I have chosen to
  25. display the data at the maximum possible resolution (one altitude-value
  26. per display-pixel).  This means that it takes more than one data-file to
  27. create a full-screen display.  For VGA, 6 data-files are required, and
  28. for SVGA it takes 12.
  29.  
  30. If you decide to down-load the "TOPOx.ZIP" files (which are VERY large),
  31. you can display any area contained in them using the same programs.  If
  32. no file-name is included on the command-line, the programs default to
  33. reading the sample data-files included here.  If you want, though, you
  34. can start the programs with the command:
  35.  
  36.                 TOPOGRAF (or TOPOSVGA) <Input File Name>
  37.  
  38. Replace <Input File Name> with the name of one of the files contained in
  39. the "TOPOx.ZIP" file you down-loaded and unZIPped.  The names of these
  40. files follow the following pattern:
  41.  
  42.          <Degrees North Longitude><Degrees West Latitude>.30s
  43.  
  44. Longitude must be a 2-digit number and latitude must be 3-digits.
  45. For example, New Orleans has a north longitude of about 30 and a west
  46. latitude of about 90, so the data-file with containing New Orleans
  47. would be named "30090.30s".  The programs interpret the command-line
  48. file as being the south-west-most area of the display. For example, if
  49. you wanted to display the area from 30 degrees west longitude, 89 degrees
  50. north latitude to 31 degrees west longitude, 91 degrees north latitude
  51. in VGA resolution (which is the default for "TOPOGRAF.EXE"), you could
  52. enter the command "TOPOGRAF 30091.30s".
  53.  
  54. The programs are written in QuickBASIC.  The SVGA version uses an add-on
  55. function library called "GRAFWIZ" which allows extended VGA mode
  56. programming.  The way I figured out the file structure of the
  57. topographic data-files was to display their contents to the screen and
  58. see that they consisted of numbers in the range of 0 to about 10,000.
  59. This indicated to me that these numbers represented MSL (mean sea level)
  60. altitudes.  By figuring out that there were 14,400 numbers in each file,
  61. I deduced that these numbers represented an area of 120 by 120 altitude
  62. points (120X120=14,400).
  63.